<template>
  <div>
    <i class="el-icon-collection" style="margin-right: 10px" />
    <h5>PHP演示：</h5>
    <p style="padding: 16px; line-height: 1.45; background-color: #f6f8fa; border-radius: 3px; font-size: 12px; color: #333; min-height: 500px; width: 1120px;">
        {{ field }}
      </p>
  </div>
</template>

<script>
import axios from "axios";
export default {
  name: "DocExample",
  data() {
    return {
      field: "",
    };
  },
  created() {},
  mounted() {
    this.getField()
  },
  methods: {
    getField() {
      axios.get("/example/list").then(({ data: res }) => {
        console.log(res);
        if (res.code === 200) {
          this.field = res.field
        }else{
          this.$message.error('错了哦，这是一条错误消息');
        }
      });
    },
  },
};
</script>
<style scoped='less'>
</style>